class MyThread extends Thread{
	private int function;
    public MyThread(int function) {
       this.function=function;
    }
	public void run() {
		if(function == 1) {		//���̣߳����漰������
			LoginInterface myShow = new LoginInterface();
			myShow.launch();
		}else if(function == 2) {		//�����̣���ѯ�Ƿ������ѣ�
			while(true) {
				try {
					//System.out.print
					sleep(30*1000);
					PopupRemind myPop = new PopupRemind();
					myPop.main(null);
					//DatabaseCtrl.close();
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				
			}
		}else if(function == 3) {		//��ѯ�Ƿ����ʼ�����
			while(true) {
				try {
					sleep(30*1000);
					MailRemind myMail = new MailRemind();
					myMail.main(null);
					//DatabaseCtrl.close();
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			
			}
			
		}
	}
	
}

 

 